/**
 * 
 */
package org.rollinitiative.d20.entity;

import java.util.EnumMap;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.rollinitiative.d20.AdjustableValue;

/**
 * @author bebopjmm
 * 
 */
public class Movement
{
    static final Log LOG_ = LogFactory.getLog(Movement.class);

    public enum EncumberanceType {
        LIGHT, MEDIUM, HEAVY;
    }

    EnumMap<EncumberanceType, AdjustableValue> moveMap = new EnumMap<EncumberanceType, AdjustableValue>(
            EncumberanceType.class);


    public Movement(int speedLight, int speedMedium, int speedHeavy)
    {
        AdjustableValue speedValue = new AdjustableValue(speedLight);
        moveMap.put(EncumberanceType.LIGHT, speedValue);
        speedValue = new AdjustableValue(speedMedium);
        moveMap.put(EncumberanceType.MEDIUM, speedValue);
        speedValue = new AdjustableValue(speedHeavy);
        moveMap.put(EncumberanceType.HEAVY, speedValue);
    }
    
    public int getSpeed(EncumberanceType encumberance)
    {
        return moveMap.get(encumberance).getCurrent();
    }
    
    public AdjustableValue getSpeedValue(EncumberanceType encumberance)
    {
        return moveMap.get(encumberance);
    }
}
